
/* <<< COPYRIGHT START >>>
 * Copyright 2006-Present OxygenSoftwareLibrary.com
 * Licensed under the GNU Lesser General Public License.
 * http://www.gnu.org/licenses/lgpl.html
 * 
 * @author: Ugorji Dick-Nwoke
 * <<< COPYRIGHT END >>>
 */


package oxygen.tool.wlfacade.plugins;

import java.util.List;

import org.python.core.PySequence;

import oxygen.jython.OxyJythonConvenienceCommands;
import oxygen.tool.facade.FacadePluginAdapter;
import oxygen.tool.wlfacade.WLFacadeContextHelper;
import oxygen.tool.wlfacade.helpers.WLConfig;

public class Invoke extends FacadePluginAdapter {

  public Object execute(String opname, PySequence args) throws Exception {
    return execute(opname, OxyJythonConvenienceCommands.py2jlist(args));
  }
  
  public Object execute(String opname, List args) throws Exception {
    WLFacadeContextHelper wlctx = new WLFacadeContextHelper(ctx);
    return WLConfig.invoke(wlctx, opname, args);
  }
  
  public Object execute(String opname) throws Exception {
    WLFacadeContextHelper wlctx = new WLFacadeContextHelper(ctx);
    return WLConfig.invoke(wlctx, opname);
  }
  
}

